package cn.zwx.learn.mybatis.example.croe.executor;

import cn.zwx.learn.mybatis.example.croe.session.Configuration;

/**
 * 默认执行器
 * @author zhangwenxue 
 * @date 2022/5/7 21:51
*/ 
public class SimpleExecutor implements Executor{
    Configuration configuration;
    public SimpleExecutor(Configuration configuration) {
        this.configuration = configuration;
    }

    @Override
    public <T> T query(String statement, Object[] parameter, Class pojo) {
        StatementHandler statementHandler = new StatementHandler(new ResultSetHandler());
        return statementHandler.query(statement, parameter, pojo);
    }
}
